/*NOTICE

This software was produced for the U. S. Government
under Contract No. FA8721-09-C-0002, and is
subject to the Rights in Noncommercial Computer Software
and Noncommercial Computer Software Documentation Clause
(DFARS) 252.227-7014 (JUN 1995)

(c) 2009 The MITRE Corporation. All Rights Reserved.
*/
package org.mitre.xmltransform.transform;

public class TransformFactory {
	private TransformFactory() {
		
	}
	public static TransformFactory getInstance() {
		if (cInstance == null) {
			cInstance = new TransformFactory();
		}
		return cInstance;
	}
	
	public Transform getTransform(String pName) {
		try {
			Class<?> cls = Class.forName("org.mitre.xmltransform." + pName.toLowerCase() + "." + pName + "Transform");
			return (Transform)cls.newInstance();
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}
	
	private static TransformFactory cInstance = null;
}
